export default (params) => {
    const baseUrl = "https://www.jianbingkonggu.com/"
    let head = {}
    if (!params.url.includes("/DouyinLogin")) {
        head["token"] = tt.getStorageSync('token');
    }
    head['Content-Type'] = 'application/x-www-form-urlencoded'
    return new Promise((resolve, reject) => {
        tt.request({
            ...params,
            url: baseUrl + params.url,
            header: head,
            success(res) {
                resolve(res.data)
            },
            fail(err) {
                reject(err)
            }
        });

    })
}